package com.yxh.www.author;

import com.yxh.www.mysql.util.CodeGeneratorUtil;

/**
 * <p>
 *  代码生成
 * </p>
 *
 * @author yangxiaohui
 * @since 2020/5/8
 */
public class CodeGenerator {
    public static void main(String[] args) {
        String[] tables=new String[]{
                "sm_user",
                "sm_account",
                "sm_account_api_relation",
                "sm_organize",
                "sm_resource",
                "sm_role",
                "sm_role_resource_relation",
                "sm_server_api",
                "sm_user_object_relation",
        };
        CodeGeneratorUtil codeGeneratorUtil=CodeGeneratorUtil.buildCodeGenerator(
                "jdbc:mysql://127.0.0.1:3306/author-cloud?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT&unullNamePatternMatchesAll=true&allowMultiQueries=true&autoReconnect=true",
                "com.mysql.cj.jdbc.Driver",
                "root",
                "yxh123..",
                "Yangxiaohui");
        codeGeneratorUtil.generatorCode(
                "F:\\HzqxProject\\template-cloud\\individual-server\\author-server",
                "com.yxh.www.author",
                tables
        );
    }
}
